<?php echo $javascript->link('jquery.ui.datepicker-es'); ?>
<script>
    $(document).ready(function(){
        $(".campofecha").datepicker({
            yearRange: '1900:2011',
            showOn: 'both',
            buttonImage: '/tierras/sitcake/img/calendar.jpg',
            buttonImageOnly: true,
            changeYear: true,
            numberOfMonths: 1
                
        });

        $('#orden').change(function() {
          
            selectDiv();

        });

       
    })

    function selectDiv(){
        if($('#orden option:selected').val()==2){
            $('#divorden').show("slow");
            $('#ord').attr('disabled','');

        }else{

            $('#divorden').hide("slow");
            $('#ord').attr('disabled','disabled');
            $('#ord').attr('value',0);
                
        }
    }

</script>


<?php echo $this->Session->flash(); ?>
<h1>ADICIONAR INFORMACIÓN AVALÚO PREDIO<?php ?></h1>

<div id="loading" style="display: none;">
    <?php echo $html->image('loading.gif', array('border' => "0", 'align' => 'center')); ?>
</div>

<fieldset>
    <?php echo $form->create('PropertyAppraisal'); ?>
    <table cellpadding ="7" aling = "left">
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.destinacion_actual', array('label' => "Destinación actual")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.vigencia_actualizacion', array('label' => "Vigencia actualización")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.zona_homogenea_descripcion', array('label' => "Descripción zona homogenea")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.zona_homogenea_valor', array('label' => "Valor zona homogenea")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.area_terreno', array('label' => "Área terreno")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.area_construccion', array('label' => "Área construccion")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.avaluo_vigente', array('label' => "Avaluo vigente")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.documentos_suministrados', array('label' => "Documentos suministrados")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.delimitacion', array('label' => "Delimitación")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.actividad_predominante', array('label' => "Actividad predominante")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.desarrollo', array('label' => "Desarrollo")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.nivel_socioeconomico', array('label' => "Nivel socioeconomico")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.comercializacion', array('label' => "Comercialización")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.vias_de_acceso', array('label' => "Vias de acceso")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.servicios_comunales', array('label' => "Servicios comunales")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.servicios_publicos', array('label' => "Servicios públicos")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.orden_publico', array('label' => "Orden público")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.perspectivas_valorizacion', array('label' => "Perspectivas valorización")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.reglamentacion_urbanistica', array('label' => "Reglamentación urbanistica")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.ubicacion', array('label' => "Ubicación")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.areas', array('label' => "Áreas")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.linderos', array('label' => "Linderos")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.forma_geometrica', array('label' => "Forma geométrica")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.altura', array('label' => "Altura")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.temperatura', array('label' => "Temperatura")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.precipitacion', array('label' => "Precipitación")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.piso_termico', array('label' => "Piso térmico")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.factores_climaticos_limitantes', array('label' => "Factores climáticos limitantes")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.distribucion_lluvias', array('label' => "Distribución lluvias")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.numero_cosechas', array('label' => "Número cosechas")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.zonas_de_vida', array('label' => "Zonas de vida")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.suelos', array('label' => "Suelos")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.recursos_hidricos', array('label' => "Recursos hídricos")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.frente_a_vias', array('label' => "Frente a vias")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.topografia', array('label' => "Topografía")); ?></td>           
            <td><?php echo $form->input('PropertyAppraisal.vegetacion_natural', array('label' => "Vegetación natural")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.vias_internas', array('label' => "Vias internas")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.cercas_perimetrales_internas', array('label' => "Cercas perimetrales internas")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.explotacion_economica', array('label' => "Explotación económica")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.redes_de_servicios', array('label' => "Redes de servicios")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.irrigacion', array('label' => "Irrigación")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.otros', array('label' => "Otros")); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input('PropertyAppraisal.unidades_fisiologicas', array('label' => "Unidades fisiológicas")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.resultado_avaluo', array('label' => "Resultado avalúo")); ?></td>
            <td><?php echo $form->input('PropertyAppraisal.unidades_fisiograficas', array('label' => "Unidades fisiograficas")); ?></td>
        </tr>
    </table>



    <?php
    echo $ajax->submit('Guardar', array('url' => array('controller' => 'PropertyAppraisals', 'action' => 'edit', $this->data['PropertyAppraisal']['id']), 'update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading'));
    echo $form->end();
    ?>

</fieldset>
